package com.zb;

import com.zb.Utils.MybatisUtils;
import com.zb.mapper.UserMapper;
import com.zb.pojo.User;
import org.apache.ibatis.session.SqlSession;

import java.io.IOException;
import java.util.List;

public class Test1 {
    public static void main(String[] args) throws IOException {
        SqlSession sqlSession = MybatisUtils.getSqlSession();
        //执行sql语句c;
        UserMapper userMapper= sqlSession.getMapper(UserMapper.class);
        List<User> users = userMapper.selectAll();
        System.out.println(users);
        //释放资源
        sqlSession.close();

    }

}
